package com.test;

import java.sql.Connection;
import java.sql.DriverManager;

public class DataBaseUtil
{
	private static Connection conn = null;

	public static Connection getConn()
	{
		Connection conn = null;
		try
		{
			if (conn == null)
			{
				Class.forName("org.postgresql.Driver");
				String url = "jdbc:postgresql://localhost:5432/security_db";
				conn = DriverManager.getConnection(url, "postgres", "root");

			}
		}
		catch (Exception e)
		{
			e.printStackTrace();
		}
		return conn;
	}

}
